<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'inventory-batch-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="span-7 append-1 ta_right bold">
		<?php echo $form->labelEx($model,'item_id'); ?>
	</div>
	<?php 
	$itemArray = CHtml::listData(Item::model()->buildListData(),'id','name');
	
	$itemArray[0] = '[Select Item]';
	
	ksort($itemArray);

	?>

	<div class="span-26 append-bottom-1">
		<?php echo $form->DropDownList($model,'item_id',$itemArray); ?>
		<?php echo $form->error($model,'item_id'); ?>
	</div>

	<div class="span-7 append-1 ta_right bold">
		<?php echo $form->labelEx($model,'location_id'); ?>
	</div>
	<?php 
	$locationArray = CHtml::listData(InventoryLocation::model()->findAll(),'id','code'); 
	$locationArray[0] = '[Select Location]';
	ksort($locationArray);
	?>

	<div class="span-26 append-bottom-1">
		<?php echo $form->DropDownList($model,'location_id',$locationArray, array('style'=>'width:139px;')); ?>
		<?php echo $form->error($model,'location_id'); ?>
	</div>

	<div class="span-7 append-1 ta_right bold">
		<?php echo $form->labelEx($model,'quantity'); ?>
	</div>
	<div class="span-26 append-bottom-1">
		<?php echo $form->textField($model,'quantity', array('size'=>'5')); ?>
		<?php echo $form->error($model,'quantity'); ?>
	</div>

	<div class="span-7 append-1 ta_right bold">
		<?php echo $form->labelEx($model,'unit_cost'); ?>
	</div>
	<div class="span-26 append-bottom-1">
		<?php echo $form->textField($model,'unit_cost', array('size'=>'5')); ?>
		<?php echo $form->error($model,'unit_cost'); ?>
	</div>


<div class="edit-end"></div>

<div style="text-align:center;">
	<input src="/cloverdale/images/buttons/save.gif" type="image" name="yt0" value="submit" /></div>

<?php $this->endWidget(); ?>

</div><!-- form -->